Skip to content

Comments

Задание 3#696

Open
aoiaoki wants to merge 5 commits intoYandex-Practicum:mainfrom
aoiaoki:develop3
Open

Задание 3#696
aoiaoki wants to merge 5 commits intoYandex-Practicum:mainfrom
aoiaoki:develop3

Conversation

@aoiaoki
Copy link

@aoiaoki aoiaoki commented Feb 4, 2026

No description provided.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Необходимо исправить: эта директория лишняя в проекте. Необходимо убрать её из ветки и добавить в .gitignore в корне проекта

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Необходимо исправить: эта директория лишняя в проекте. Необходимо убрать её из ветки и добавить в .gitignore в корне проекта

self.driver = driver
self.wait = WebDriverWait(driver, timeout)

def find(self, locator):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Необходимо исправить здесь и далее: не хватает аннотации allure для шага - allure.step

Comment on lines 16 to 17
def refresh(self):
self.driver.refresh()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Необходимо исправить здесь и далее: все вызовы к driver/WebDriverWait должны быть описаны в методах BasePage, а затем вызываться через эти методы в *Page-классах через наследование



@allure.title("Счётчики заказов увеличиваются")
def test_orders_counters(feed_page):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нужно исправить здесь и далее: Для корректного запуска тестов необходимо код с шагами теста поместить в тестовый метод (нейминг начинается с test_), а метод - в тестовый класс (нейминг начинается с Test). Необходимо привести к такому формату все модули внутри пакета tests

total_before = feed_page.get_total_orders()
today_before = feed_page.get_today_orders()

feed_page.refresh()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Необходимо исправить здесь и далее: тут явно не хватает шагов с оформлением заказа


@allure.title("Заказ отображается в разделе «В работе»")
def test_order_in_progress(feed_page):
assert feed_page.has_orders_in_progress()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Необходимо исправить здесь и далее: тут явно не хватает шагов с оформлением заказа

Comment on lines 5 to 19
@allure.title("Переход по клику на «Конструктор»")
def test_open_constructor(main_page):
main_page.open_constructor()


@allure.title("Переход по клику на «Лента заказов»")
def test_open_feed(main_page):
main_page.open_feed()


@allure.title("Открытие и закрытие модального окна ингредиента")
def test_ingredient_modal(main_page):
main_page.open_ingredient_modal()
main_page.close_ingredient_modal()
main_page.wait_modal_closed()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Необходимо исправить: этим тестам не хватает шагов и проверок

Comment on lines 44 to 45
@pytest.fixture
def main_page(driver):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нужно исправить: фикстуры не занимаются выполнением примитивной логики, они выполняют сложную логику предусловий\постусловий и вычислений. Эти объекты можно сразу создавать в тестах или фикстурах

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не исправлено

Comment on lines 25 to 37
with allure.step("Получение ингредиентов"):
ingredients = requests.get(
f"{BASE_URL}/api/ingredients"
).json()["data"]

ingredient_ids = [ingredients[0]["_id"]]

with allure.step("Оформление заказа через API"):
response = requests.post(
f"{BASE_URL}/api/orders",
json={"ingredients": ingredient_ids}
)
assert response.status_code == 200

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Необходимо исправить: оформление заказа - это ключевой шаг теста, он должен быть выполнен на стороне UI

Comment on lines 55 to 67
ingredients = requests.get(
f"{BASE_URL}/api/ingredients"
).json()["data"]

ingredient_ids = [ingredients[0]["_id"]]

with allure.step("Создание заказа"):
response = requests.post(
f"{BASE_URL}/api/orders",
json={"ingredients": ingredient_ids}
)
assert response.status_code == 200

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Необходимо исправить: оформление заказа - это ключевой шаг теста, он должен быть выполнен на стороне UI. Шагов с api в теле теста быть не должно

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants